package org.rambadger.command.event;

import com.google.common.base.Objects;
import org.rambadger.command.validation.UrlIdentifier;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

public class TrackDeleted implements Serializable {
    private static final long serialVersionUID = -5583657996268338450L;

    private final String platformId;
    private final String trackId;

    public TrackDeleted(String platformId, String trackId) {
        this.platformId = platformId;
        this.trackId = trackId;
    }

    @UrlIdentifier @NotNull
    public String getPlatformId() {
        return platformId;
    }

    @UrlIdentifier @NotNull
    public String getTrackId() {
        return trackId;
    }

    public String getFullTrackId() {
        return platformId+"/"+trackId;
    }

    @Override
    public String toString() {
        return Objects.toStringHelper(this)
                .add("platformId", platformId)
                .add("trackId", trackId)
                .toString();
    }
}
